package com.jia.controller;

import com.jia.pojo.Dept;
import com.jia.service.DeptClientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
public class DeptConsumerController {

    @Autowired
    DeptClientService service = null;

    @GetMapping("/consumer/dept/info/{id}")
    public Dept info(@PathVariable Long id){
        return this.service.selectById(id);
    }
    @GetMapping("/consumer/dept/list")
    public List<Dept> list(){
        return this.service.selectAll();
    }

}
